Skip to content

Fix extra_body silently dropped during load_component()#7421

Open
joaquinhuigomez wants to merge 1 commit intomicrosoft:mainfrom
joaquinhuigomez:fix/extra-body-config-7418
Open

Fix extra_body silently dropped during load_component()#7421
joaquinhuigomez wants to merge 1 commit intomicrosoft:mainfrom
joaquinhuigomez:fix/extra-body-config-7418

Conversation

@joaquinhuigomez
Copy link
Copy Markdown

@joaquinhuigomez joaquinhuigomez commented Mar 18, 2026

Summary

Fixes #7418extra_body is silently dropped when loading OpenAI model client config via load_component().

The CreateArguments TypedDict and CreateArgumentsConfigModel Pydantic model both lacked an extra_body field, so any provider-specific parameters (e.g. extra_body: {"reasoning": {"effort": "high"}} for o3) were stripped during config validation.

This adds extra_body: Optional[Dict[str, Any]] to both models and threads it through to the API call.

@joaquinhuigomez
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@joaquinhuigomez joaquinhuigomez force-pushed the fix/extra-body-config-7418 branch from b4922f1 to fe0bcf2 Compare March 24, 2026 20:50
Add extra_body field to CreateArguments (TypedDict) and
CreateArgumentsConfigModel (Pydantic) so that extra_body specified in
JSON config is preserved through the _from_config() / _to_config()
round-trip. Previously, extra_body worked when passed directly to the
constructor but was silently discarded when loading via
load_component() or AutoGen Studio JSON config.

Fixes microsoft#7418
@joaquinhuigomez joaquinhuigomez force-pushed the fix/extra-body-config-7418 branch from fe0bcf2 to c43c9f0 Compare March 27, 2026 12:26
@joaquinhuigomez
Copy link
Copy Markdown
Author

Friendly ping — any chance this could get a review? Happy to address feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

extra_body in OpenAIChatCompletionClient config is silently ignored when loaded via AutoGen Studio JSON

2 participants